home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: another 1.10 job control bug?
- Date: Wed, 9 Mar 94 22:35:30 CET
- From: Juergen Lock <nox@jelal.north.de>
- mint@atari.archive.umich.edu
- In-Reply-To: <199403090050.TAA20664@terminator.rs.itd.umich.edu>; from "Nicholas S Castellano" at Mar 8, 94 7:50 pm
- Message-Id: <9403092135.AA00931@jelal.north.de>
-
- Nicholas S Castellano writes:
-
- > My old routine definitely does have a bug...Juergen's patch (WITH THE
- > FIX I SENT OUT A DAY OR SO AGO) works a bit better. For now, it would
- > be best to use that scheme, and perhaps modify getty slightly to take
- > any strange cases into account: the first thing it should do is
- > "steal" the terminal from any existing processes that think they own
- > it, by changing the process group of the terminal.
-
- yes this is a patch i posted some time ago... only i changed init not
- getty. :)
-
- Index: init/init.c
- --- /i/tmp/init/init.c Mon Aug 2 23:58:08 1993
- +++ /f/msrc/ini11/init/init.c Tue Aug 24 13:14:56 1993
- @@ -44,6 +44,7 @@
- #include <sys/resource.h>
-
- #ifdef MINT
- +#include <ioctl.h>
- #include <sys/dir.h>
- #include <mintbind.h>
-
- @@ -493,12 +494,17 @@
-
- if ((pid = vfork()) == 0)
- {
- - setpgrp(getpid(), getpid());
- + long pgrp = setpgrp(getpid(), getpid());
-
- tty = open(ttyname, O_RDWR);
-
- #ifdef MINT
- + if (tty == -1 || pgrp < 0) {
- + perror(ttyname);
- + _exit(0);
- + }
- dup2(tty, -1); /* set controlling terminal */
- + ioctl (-1, TIOCSPGRP, &pgrp);
- #endif
- dup2(tty, 0);
- dup2(tty, 1);
-
- cheers
- Juergen
- --
- J"urgen Lock / nox@jelal.north.de / UUCP: ..!uunet!unido!uniol!jelal!nox
- ...ohne Gewehr
- PGP public key fingerprint = 8A 18 58 54 03 7B FC 12 1F 8B 63 C7 19 27 CF DA
-